package com.xiaoxiong.mami.service;

import com.xiaoxiong.mami.dao.daomain.UserInfo;
import com.xiaoxiong.mami.dao.mapperImpl.UserInfoMapperImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2017/7/27.
 */
@Service
public class UserInfoService implements UserInfoMapperImpl {

    @Autowired
    UserInfoMapperImpl userInfoMapperImpl;


    @Override
    public int deleteByPrimaryKey(Long id) {
        return 0;
    }

    @Override
    public int insert(UserInfo record) {
        return 0;
    }

    @Override
    public int insertSelective(UserInfo record) {
        return userInfoMapperImpl.insertSelective(record);
    }



    @Override
    public UserInfo selectByPrimaryKey(Long id) {
        return userInfoMapperImpl.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(UserInfo record) {
        int result = userInfoMapperImpl.updateByPrimaryKeySelective(record);
        if (result == 1){
            return 1;
        }
        return 0;
    }

    @Override
    public int updateByPrimaryKey(UserInfo record) {
        return 0;
    }

    @Override
    public UserInfo selectByUserId(String userId) {
        return userInfoMapperImpl.selectByUserId(userId);
    }
    @Override
    public UserInfo selectByTelephone(String telephone) {
        return userInfoMapperImpl.selectByTelephone(telephone);
    }

    @Override
    public UserInfo selectByTelephoneAndPassword(String telephone,String password) {
        return userInfoMapperImpl.selectByTelephoneAndPassword(telephone,password);
    }
    @Override
    public int updateByUserId(UserInfo record){
        return userInfoMapperImpl.updateByUserId(record);
    }

    @Override
    public int insertUserInfo(UserInfo record) {
        return userInfoMapperImpl.insertUserInfo(record);
    }


}
